<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        //  1
        if(true){

        }else{

        }

        var date = new Date();
        var week = date.getDay(); //获取星期，数字0-6 0星期日
        console.log(week);
        if(week === 0) {
            console.log("星期日")
        }else if(week === 1){
            console.log("星期一")
        }
        //  2. switch(等值比较)
        var a = 10;
        switch (a) {
            case 10: 
                console.log("10");
            case 20:
                console.log("20");
                break;
            case 30:
                console.log("30");
            default:
                console.log("gg");
        }
    // -------------循环语句

    </script>
</body>
</html>